import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/welcome'
  },
  {
    path: '/welcome',
    name: 'Welcome',
    component: () => import('../views/Welcome.vue')
  },
  {
    path: '/loan-calculator',
    name: 'LoanCalculator',
    component: () => import('../views/LoanCalculator.vue')
  },  {
    path: '/stock-valuation',
    name: 'StockValuation',
    component: () => import('../views/CompanyValuation.vue')
  },
  {
    path: '/ai-chat',
    name: 'AIChat',
    component: () => import('../views/AIChat.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue')
  },  {
    path: '/post-integrated',
    name: 'PostIntegrated',
    component: () => import('../views/PostIntegrated.vue')
  },
  {
    path: '/post-create',
    name: 'PostCreate',
    redirect: '/post-integrated'
  },
  {
    path: '/post-list',
    name: 'PostList',
    redirect: '/post-integrated'
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router